package com.zonerobotics.tutorial.btcontrol;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.view.SurfaceHolder;
import android.view.SurfaceView;

public class VidSurfaceView extends SurfaceView implements SurfaceHolder.Callback{

    Bitmap myicon;
    Canvas canvas;
    private Paint   mBitmapPaint;

    Paint p= new Paint();


      @Override
       protected void onDraw(Canvas canvas) {
          //Bitmap myicon=BitmapFactory.decodeResource(getResources(),R.drawable.icon);
          canvas.drawColor(Color.GREEN);
          canvas.drawBitmap(myicon, 0,0, p);
          // canvas.drawBitmap(myicon, 0,0, null);
          // canvas.drawBitmap(myicon, 25,25, null);
      }
       public VidSurfaceView(Context context) {
           super(context);
           // TODO Auto-generated constructor stub
       }

       public void surfaceChanged(SurfaceHolder arg0, int arg1, int arg2, int arg3) {
           // TODO Auto-generated method stub

       }

       public void surfaceCreated(SurfaceHolder holder) {
           // TODO Auto-generated method stub

       }

       public void surfaceDestroyed(SurfaceHolder arg0) {
           // TODO Auto-generated method stub

       }
   }
